<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateVoteSurveyMembersTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('survey_members', function(Blueprint $table)
		{
			$table->increments('id')->comment('主键');
			$table->string('name', 30)->nullable()->comment('姓名');
			$table->integer('age')->unsigned()->nullable()->comment('年龄');
			$table->string('education', 20)->nullable()->comment('学历');
			$table->string('career', 20)->nullable()->index('current_career')->comment('目前职业');
			$table->string('major', 20)->nullable()->index('expect_career')->comment('期望职业');
			$table->integer('survey_id')->unsigned()->nullable()->comment('填写问卷id');
			$table->integer('create_at')->nullable()->comment('填写时间');
			$table->string('wechat', 40)->nullable()->index('wechat');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('vote_survey_members');
	}

}
